﻿using Function;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace BLL.Utility
{
    public class Bind
    {
        /// <summary>
        /// 得到定义表
        /// </summary>
        /// <param name="DYTable">定义表表名</param>
        /// <param name="code">code</param>
        /// <param name="target">目标数据库</param>
        /// <returns></returns>
        public static string GetDyCode(string DYTable, string code, PubConstant.DataBaseTarget target)
        {
            string Message = "";
            var dt1 = BLL.Data_BindDateBLL.Page_BindDate(out Message, DYTable, "Code", 1, 0, "Code=" + code, target) as DataTable;
            if (dt1.Rows.Count > 0)
                return dt1.Rows[0][1].ToString();
            return "";
        }
    }
}